package com.quan.common.base.enums;

public enum LogType {

	LOGIN(1, "登录日志"),
	
	BUSINESS(2, "业务日志"),
	
	EXCEPTION(3, "异常日志"),
	
	UNKNOWN(4, "未知");
	
	private int index ;
	
	private String name ;

	private LogType(int index, String name) {
		this.index = index;
		this.name = name;
	}
	
	public static String getName(int index) {
		for(LogType actionType : LogType.values()) {
			if(actionType.getIndex() == index) {
				return actionType.getName() ;
			}
		}
		return null ;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	
}
